<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./Template/Template3.xhtml">

            <ui:define name="top">
                top
            </ui:define>

            <ui:define name="content">
                <f:view>
                    <p:panel header="Registrar Dia">
                        <p:growl life="4000"/>
                    <h:form>
                     
                        <p:panelGrid columns="2">
                        <h:outputLabel value="Dia:" for="nameDay" />
                   
                        
                         
                        <h:selectOneMenu id="nameDay" value="#{dayBean.dia.nameDay}" title="Dia" >
                                <!-- TODO: update below reference to list of available items-->
                                <f:selectItems value="#{dayBean.dias}" var="item"/>
                            </h:selectOneMenu>
                       
                       
                      
                        
                            <h:outputLabel value="Trabajo:" for="worked" />
                            <p:inputText id="worked" value="#{dayBean.dia.worked}" title="Worked" required="true" requiredMessage="The Worked field is required."/>
                           
                            
                            <h:outputLabel value="Horas Trabajadas:" for="hourWorked" />
                            <p:inputText id="hourWorked" value="#{dayBean.dia.hourWorked}" title="HourWorked" required="true" requiredMessage="The HourWorked field is required."/>
                           
                            
                            <h:outputLabel value="Tiempo extra:" for="overTime" />
                            <p:inputText id="overTime" value="#{dayBean.dia.overTime}" title="OverTime" />
                           
                            
                             <h:outputLabel value="Mes:" for="Month" />
                            <h:selectOneMenu id="Month" value="#{dayBean.dia.month}" title="Mes" >
                                <!-- TODO: update below reference to list of available items-->
                                <f:selectItems value="#{dayBean.meses}" var="item"/>
                            </h:selectOneMenu>
                            
                            <h:outputLabel value="Numero de semana:" for="numberWeek" />
                            <p:inputText id="numberWeek" value="#{dayBean.dia.numberWeek}" title="NumberWeek" required="true" requiredMessage="The NumberWeek field is required."/>
                          
                            
                            <h:outputLabel value="Trabajador:" for="staffIdstaff" />
                            <h:selectOneMenu id="staffIdstaff" value="#{dayBean.idStaffSeleccionado}" title="StaffIdstaff"  >
                                <!-- TODO: update below reference to list of available items-->
                                <f:selectItems value="#{dayBean.listaStaff}" var="item" itemValue="#{item.idstaff}" itemLabel="#{item.name} #{item.firstName} #{item.lastName}" />
                            </h:selectOneMenu>
                        </p:panelGrid>
                        <p:commandButton action="#{dayBean.prepararStaff()}" value="Aceptar"/>
                        <p:commandButton action="Dia" value="cancelar" immediate="true"/> 
                    </h:form>
                    </p:panel>
                </f:view>

            </ui:define>

            <ui:define name="bottom">
                bottom
            </ui:define>

        </ui:composition>

    </body>
</html>
